<!DOCTYPE HTML>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<meta charset="utf-8">
<head th:include="include :: header"></head>
<body class="gray-bg">
	<div class="wrapper wrapper-content animated fadeInRight">
		<div class="row">
			<div class="col-sm-12 select-info">
				<form id="operlog-form" style="margin-left: 30px">
					<input type="hidden" id="deptId" name="deptId">
	                <input type="hidden" id="parentId" name="parentId">
					<div class="select-list gd">
						<ul>
							<li>
								<a class="btn btn-outline btn-success btn-rounded" onclick="add()" shiro:hasAnyRoles="admin,branch_admin" shiro:hasPermission="module:conference:add">
	                				<i class="fa fa-plus"></i> <strong>添加会议</strong>
	            				</a>
							</li>
							<li>
							<!-- 给党委添加审核预备党员使用的会议 -->
								<a class="btn btn-outline btn-success btn-rounded" onclick="addPrepare()" shiro:hasAnyRoles="admin,total_admin" shiro:hasPermission="module:conference:add">
	                				<i class="fa fa-plus"></i> <strong>添加党委会议</strong>
	            				</a>
							</li>
							<li>
								会议名称名称：<input type="text" name="loginName"/>
							</li>
							<li>
								备案状态：<select name="status" th:with="type=${@dictService.selectDictData('sys_normal_disable')}">
									<option value="">所有</option>
									<option th:each="e : ${type}" th:text="${e['dictLabel']}" th:value="${e['dictValue']}"></option>
								</select>
							</li>
							<li>
								<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search($('form').attr('id'))"><i class="fa fa-search"></i>&nbsp;搜索</a>
							</li>
						</ul>
					</div>
				</form>
			</div>
		</div>
	</div>
	
	<div class="wrapper wrapper-content animated fadeInRight" style="margin-top: -20px">
		
		<div class="row">
        <div th:each="c, stat: ${conferenceList}">
			<div class="col-sm-4">
                <div class="ibox">
                    <div class="ibox-title">
                        <span class="label label-primary pull-right">NEW</span>
                        <h5 th:text="${c.conferenceName}"></h5>
                    </div>
                    <div class="ibox-content">
                        <div class="team-members">
                            <a href="#"></a>
                            <a href="#"></a>
                        </div>
                        
                                                            时间：<span th:text="${#dates.format(c.conferenceTime,'yyyy-MM-dd')}"></span>    
                                                                            
                        <div style="margin-top: 10px;" th:if="${c.conferenceEventsummary != null}">
	                                                            会议纪要：<span th:text="${#strings.substringAfter(c.conferenceEventsummary, '/')}"></span>
	                        <a th:href="@{/module/proposer/review(userId=${c.conferenceId},type=conferenceEventsummary,fileName=${c.conferenceEventsummary})}" class="btn btn-success btn-xs fa fa-edit" th:text="预览"></a>
	                        <a th:href="@{/module/proposer/download(userId=${c.conferenceId},type=conferenceEventsummary,fileName=${c.conferenceEventsummary})}" class="btn btn-success btn-xs fa fa-edit" th:text="下载"></a>
                        </div>
                        <div style="margin-top: 10px;color: red" th:if="${c.conferenceEventsummary == null}">
                        	<span th:text="无会议纪要"></span>
                        </div>
                        
                        <div style="margin-top: 10px;" th:if="${c.conferenceVote != null}">
	                                                            投票记录：<span th:text="${#strings.substringAfter(c.conferenceVote, '/')}"></span>
	                        <a th:href="@{/module/proposer/review(userId=${c.conferenceId},type=conferenceVote,fileName=${c.conferenceVote})}" class="btn btn-success btn-xs fa fa-edit" th:text="预览"></a>
	                        <a th:href="@{/module/proposer/download(userId=${c.conferenceId},type=conferenceVote,fileName=${c.conferenceVote})}" class="btn btn-success btn-xs fa fa-edit" th:text="下载"></a>
                        </div>
                        <div style="margin-top: 10px;color: red" th:if="${c.conferenceVote == null}">
                        	投票记录：<span th:text="无投票文件"></span>
                        </div>
                        
                        <div style="margin-top: 10px;" th:if="${c.successListName != null}">
	                                                           决议通过名单：<span th:text="${c.successListName}"></span>
                        </div>
                        <div style="margin-top: 10px;color: red" th:if="${c.successListName == null}">
                        	决议通过名单：<span th:text="无"></span>
                        </div>
                        
                        <div style="margin-top: 10px;" th:if="${c.failListName != null}">
	                                                           决议未通过名单：<span th:text="${c.failListName}"></span>
                        </div>
                        <div style="margin-top: 10px;color: red" th:if="${c.failListName == null}">
                        	决议未通过名单：<span th:text="无"></span>
                        </div>
                        
                        <div style="margin-top: 10px;">
                            <span>当前项目进度：</span>
                            <div class="stat-percent">48%</div>
                            <div class="progress progress-mini">
                                <div style="width: 48%;" class="progress-bar"></div>
                            </div>
                        </div>
                        <div class="row  m-t-sm">
                            <div class="col-sm-4">
                                <div class="font-bold">项目</div>
                                12
                            </div>
                            <div class="col-sm-4">
                                <div class="font-bold">周期</div>
                                4个月
                            </div>
                            <div class="col-sm-4 text-right">
                                <div class="font-bold">预算</div>
                                &yen;200,913 <i class="fa fa-level-up text-navy"></i>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            </div>
        </div>
	</div>
	
	<div th:include="include :: footer"></div>
	<script>
		var prefix = ctx + "module/conference";
		var url = prefix + "/list";
		var createUrl = prefix + "/add";
		var updateUrl = prefix + "/edit/{id}";
		var removeUrl = prefix + "/remove";
		        
		function add() {
				$.modal.open("添加会议", createUrl)
			}
			
		function addPrepare(){
				$.modal.open("添加党委会议", prefix + "/addPrepare");
		}
	</script>
	
</body>
</html>